const getNewStream = async () => {
  let stream = new MediaStream()

  let video_stm = await navigator.mediaDevices.getUserMedia({
    video:true
  })

  let audio_stm = await navigator.mediaDevices.getUserMedia({
    audio:true
  })

  video_stm.getVideoTracks().map(row => stream.addTrack(row))
  audio_stm.getAudioTracks().map(row => stream.addTrack(row))
    
  return stream
}


export  {
  getNewStream
}